<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<p:submenu label="Amministrazione" icon="ui-icon-document">
		<p:menuitem value="amministrazione" url="/private/" />

		<p:menuitem value="utenti" rendered="#{loginController.admin}"
			url="/private/user/list.jsf?faces-redirect=true" />

		<p:menuitem value="stato memoria" rendered="#{loginController.admin}"
			url="/private/memory/view.jsf?faces-redirect=true" />

		<p:menuitem value="log operazioni" rendered="#{loginController.admin}"
			url="/private/operations/list.jsf?faces-redirect=true" />

		<p:menuitem value="configurazione" rendered="#{loginController.admin}"
			url="/private/emailconfiguration/edit.jsf?faces-redirect=true" />

		<p:menuitem value="cambio password"
			action="#{loginController.goToChangePassword}" />
		<p:separator />
		<p:menuitem value="Logout" action="#{loginController.logout}" />
	</p:submenu>
	<p:submenu label="Pagine" icon="ui-icon-document"
		rendered="#{loginController.isInRole('pagine')}">
		<p:menuitem value="lista"
			url="/private/page/list.jsf?faces-redirect=true" />
	</p:submenu>
	<p:submenu label="Modelli" icon="ui-icon-document"
		rendered="#{loginController.isInRole('modelli')}">
		<p:menuitem value="lista"
			url="/private/template/list.jsf?faces-redirect=true" />
	</p:submenu>
	<p:submenu label="Menu" icon="ui-icon-document"
		rendered="#{loginController.isInRole('menu')}">
		<p:menuitem value="lista"
			url="/private/menu/list.jsf?faces-redirect=true" />
	</p:submenu>
	<p:submenu label="Risorse" icon="ui-icon-document"
		rendered="#{loginController.isInRole('resource')}">
		<p:menuitem value="lista" action="#{resourceController.listPage}" />
		<p:menuitem value="aggiungi" action="#{resourceController.addElement}" />
	</p:submenu>
	<p:submenu label="Lingue" icon="ui-icon-document"
		rendered="#{loginController.isInRole('i18n')}">
		<p:menuitem value="definizioni"
			url="/private/language/list.jsf?faces-redirect=true" />
		<p:menuitem value="associazioni"
			url="/private/i18n/list.jsf?faces-redirect=true" />
	</p:submenu>
</ui:composition>